-----------------------------------
-- Ability: Equanimity
-----------------------------------

require("scripts/globals/settings");
require("scripts/globals/status");

-----------------------------------
-- OnUseAbility
-----------------------------------

function OnAbilityCheck(player,target,ability)
	if (player:hasStatusEffect(EFFECT_EQUANIMITY)) then
		return MSGBASIC_EFFECT_ALREADY_ACTIVE, 0;
	elseif (player:hasStatusEffect(EFFECT_PAX)) then
		return MSGBASIC_UNABLE_TO_USE_JA2,0;
	end
	return 0,0;
end;

function OnUseAbility(player, target, ability)
	player:addStatusEffect(EFFECT_EQUANIMITY,player:getMerit(MERIT_EQUANIMITY),0,60);

    return EFFECT_EQUANIMITY;
end;